set_capital = { state = 277 }

set_oob = "NSR_1936"

set_technology = {
	infantry_weapons = 1
	infantry_weapons1 = 1
	tech_recon = 1
	tech_support = 1		
	tech_engineers = 1
	tech_mountaineers = 1
	tech_trucks = 1
	gw_artillery = 1
	interwar_antiair = 1
	basic_train = 1
}

set_convoys = 150

	set_politics = {
		ruling_party = monarchism
		last_election = "1930.1.1"
		election_frequency = 48
		elections_allowed = no
	}
	
	set_popularities = {
		radicalsocialism = 10
		russiandem = 15
		monarchism = 75
	}
	
	set_war_support = 0.3
    set_research_slots = 3
	set_stability = 0.5

set_party_name = { 
    ideology = monarchism
    long_name = "Spanish Royal Family"
    name = SRF
}

add_ideas = {
    NSR_policy_of_war
}

if = {
	limit = {
		NOT = { has_dlc = "By Blood Alone" }
	}
	set_technology = {
		early_fighter = 1
		early_bomber = 1
		naval_bomber1 = 1
		early_transport_plane = 1
	}
	else = {
		set_technology = {
			bba_early_transport_plane = 1
		}
	}
}
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_submarine = 1
		early_destroyer = 1
		basic_destroyer = 1
		early_light_cruiser = 1
		early_heavy_cruiser = 1
		basic_heavy_cruiser = 1
		early_battleship = 1
		transport = 1
	}
}
if = {
	limit = { has_dlc = "Man the Guns" }
	set_technology = {
		basic_naval_mines = 1
		submarine_mine_laying = 1
		early_ship_hull_light = 1
		basic_ship_hull_light = 1
		early_ship_hull_submarine = 1
		basic_ship_hull_submarine = 1
		early_ship_hull_cruiser = 1
		basic_ship_hull_cruiser = 1
		early_ship_hull_heavy = 1
		basic_battery = 1
		#basic_medium_battery = 1
		basic_torpedo = 1
		basic_depth_charges = 1
		mtg_transport = 1
	}
}

#country leaders
recruit_character = NSR_alfonso_xiii
recruit_character = NSR_niceto_alcala_zamora 

if = {
	limit = {
		has_dlc = "No Step Back"
	}
	set_technology = {
		gwtank_chassis = 1
		basic_light_tank_chassis = 1
	}
}

if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	### Ship Variants ###
	create_equipment_variant = {
		name = "C Class"
		type = submarine_1
		upgrades = {
			ship_reliability_upgrade = 1
			sub_engine_upgrade = 1
			sub_stealth_upgrade = 1
			sub_torpedo_upgrade = 1
		}
	}
	create_equipment_variant = {
		name = "Príncipe Alfonso Class"
		type = light_cruiser_1
		upgrades = {
			ship_reliability_upgrade = 1
			ship_engine_upgrade = 1
			ship_gun_upgrade = 1
			ship_anti_air_upgrade = 1
		}
	}
}
if = {
	limit = { has_dlc = "Man the Guns" }
	# Submarines #
	create_equipment_variant = {
		name = "B Class"				
		type = ship_hull_submarine_1
		parent_version = 0
		name_group = SPR_SS_HISTORICAL
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_1
			fixed_ship_engine_slot = sub_ship_engine_1
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "C Class"				
		type = ship_hull_submarine_2
		name_group = SPR_SS_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_1
			fixed_ship_engine_slot = sub_ship_engine_2
			rear_1_custom_slot = empty
		}
	}
	# Destroyers #
	create_equipment_variant = {
		name = "Alsedo Class"				
		type = ship_hull_light_1
		name_group = SPR_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_1
			fixed_ship_torpedo_slot = ship_torpedo_1
			mid_1_custom_slot = ship_mine_layer_1
			rear_1_custom_slot = ship_depth_charge_1
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Churucca Class"	
		type = ship_hull_light_2
		name_group = SPR_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_2
			fixed_ship_torpedo_slot = ship_torpedo_1
			mid_1_custom_slot = empty
			rear_1_custom_slot = ship_depth_charge_1
		}
	}
	create_equipment_variant = {
		name = "Júpiter Class"					# minelayers
		type = ship_hull_light_2
		name_group = SPR_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_1
			fixed_ship_torpedo_slot = empty
			mid_1_custom_slot = ship_mine_layer_1
			rear_1_custom_slot = ship_depth_charge_1
		}
	}
	# Light Cruisers #
	create_equipment_variant = {
		name = "Monarchia Class"
		type = ship_hull_cruiser_1
		name_group = SPR_CL_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_medium_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_1
			mid_1_custom_slot = ship_torpedo_1
			mid_2_custom_slot = ship_light_medium_battery_1
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Méndez Núñes Class"
		type = ship_hull_cruiser_1
		name_group = SPR_CL_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_medium_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_1
			fixed_ship_armor_slot = ship_armor_cruiser_1
			mid_1_custom_slot = ship_torpedo_1
			mid_2_custom_slot = ship_torpedo_1
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Príncipe Alfonso Class"
		type = ship_hull_cruiser_2
		name_group = SPR_CL_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_medium_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_2
			fixed_ship_armor_slot = ship_armor_cruiser_1
			front_1_custom_slot = empty
			mid_1_custom_slot = ship_torpedo_1
			mid_2_custom_slot = ship_torpedo_1
			rear_1_custom_slot = ship_light_medium_battery_1
		}
	}
	# Heavy Cruisers #
	create_equipment_variant = {
		name = "Canarias Class"				
		type = ship_hull_cruiser_2
		name_group = SPR_CA_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_medium_battery_2
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_2
			fixed_ship_armor_slot = empty
			mid_1_custom_slot = ship_medium_battery_2
			mid_2_custom_slot = empty
			rear_1_custom_slot = ship_depth_charge_1
		}
	}
	# Battleships #
	create_equipment_variant = {
		name = "España Class"	
		type = ship_hull_heavy_1
		name_group = SPR_BB_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_heavy_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = heavy_ship_engine_1
			fixed_ship_secondaries_slot = ship_secondaries_1
			fixed_ship_armor_slot = ship_armor_bb_1
			front_1_custom_slot = ship_heavy_battery_1
			mid_1_custom_slot = ship_secondaries_1
			mid_2_custom_slot = ship_secondaries_1
			rear_1_custom_slot = empty
		}
	}
}